Dynomotion

Group: DynoMotion Message: 10469 From: cnc_machines Date: 11/3/2014
Subject: M-Code for .bat file
Greetings,

I have been experimenting with making an M-Code that runs a .exe or .bat file. When I attempt to do this it stops executing the G-Code program at that line. When I press the stop button it says:

"Error Executing PC Program
Return Code = 1
Abort?"

I am wondering what I am doing wrong. My .bat file was very simple:

@ECHO off
ECHO Hello World!
PAUSE

I was expecting it to execute this program. Any suggestions would be greatly appreciated.

Thanks,

Scott


Group: DynoMotion Message: 10471 From: Tom Kerekes Date: 11/4/2014
Subject: Re: M-Code for .bat file
Hi Scott,

KMotionCNC launches the PC program in Hidden mode because in most cases it is desired to do something without things flashing on the screen.

In your case you have PAUSE waiting for input.  So it might be working but you just don't see anything on the screen and have no way to continue.

KMotionCNC will wait for the PC program to terminate which again is what we want to do in most cases.  If you don't want to have KMotionCNC wait then you can have a batch file fork a new Process.  I think the syntax would be like:

start c:\KMotion432\KMotion\Release\SimpleFormsCS.exe

HTH
Regards
TK


From: "cnc_machines@... [DynoMotion]" <DynoMotion@yahoogroups.com>
To: DynoMotion@yahoogroups.com
Sent: Monday, November 3, 2014 1:19 PM
Subject: [DynoMotion] M-Code for .bat file

 
Greetings,

I have been experimenting with making an M-Code that runs a .exe or .bat file. When I attempt to do this it stops executing the G-Code program at that line. When I press the stop button it says:

"Error Executing PC Program
Return Code = 1
Abort?"

I am wondering what I am doing wrong. My .bat file was very simple:

@ECHO off
ECHO Hello World!
PAUSE

I was expecting it to execute this program. Any suggestions would be greatly appreciated.

Thanks,

Scott